<?php
declare (strict_types = 1);

namespace app\admin\validate\maichen;

use think\Validate;

class Finance extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
        'amount_money' => ['require', 'float',],
        'description' => ['require', 'length: 10, 100'],
        'img_url' => ['require'],
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [
        'amount_money.require' => '申请金额必须填写',
        'amount_money.float' => '申请金额必须是数值',
        'description.require' => '描述必须填写',
        'description.length' => '描述必须在 10 到 100 个字之间',
        'img_url.require' => '截图必须存在',
    ];
}
